/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package security;

import boundary.UserManager;
import javax.ejb.EJB;
import javax.enterprise.context.RequestScoped;
import javax.inject.Named;

/**
 *
 * @author MONESI
 */
@Named
@RequestScoped
public class UserBean{

    @EJB
    UserManager um;
    
    public UserBean() {
    }
    
    public String getName() {
        return um.getLoggedUser().getName();
    }
    public String getMail() {
        return um.getLoggedUser().getEmail();
    }
    public String setCalendarPrivacyPrivate(String loggedUser){
        um.setPrivacyPrivate(loggedUser);
        return "ScheduleView";
    }
     public String setCalendarPrivacyPublic(String loggedUser){
        um.setPrivacyPublic(loggedUser);
        return "ScheduleView";
    }
    
}

